package org.vergil;


import org.apache.commons.collections.map.HashedMap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.vergil.config.SystemConfig;
import org.vergil.core.service.TestForCacheMap;

import java.util.Map;

/**
 * Hello world!
 */
public class App {

    final static Logger logger = LoggerFactory.getLogger(App.class);

    public static void main(String[] args) throws InterruptedException {
        ApplicationContext context = new AnnotationConfigApplicationContext(SystemConfig.class);
//        MyService myService = context.getBean(MyService.class);
//        myService.setInfo("test");
//        myService.Test();

//        UserService service = context.getBean(UserService.class);
//        List<Map<String,Object>> users=  service.getUsers();
//        System.out.println(1);
//        MqService mqService = context.getBean(MqService.class);
//        mqService.TestSend();
        Map<String, Object> map = new HashedMap();
        map.put("id",1);
        map.put("name","vergil");
        map.put("status",1);
        TestForCacheMap testForCacheMap = context.getBean(TestForCacheMap.class);
        testForCacheMap.save(map);
        testForCacheMap.save(map);
        testForCacheMap.update(map);
    }
}
